package com.crm.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "supp_user")
public class SupplierUser implements Serializable{
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(generator="increment")
	@GenericGenerator(name="increment", strategy = "increment")
	@Column(name="id")
	private int id; 
	private String username;
	private String phn;
	private String email;
	@ManyToOne
	@JoinColumn(name="supplierid")
	private Supplier supplierId;
	

	

	public SupplierUser(Supplier supplierId, String username,
			String phn, String email) {
	
		this.supplierId = supplierId;
		this.username = username;
		this.phn = phn;
		this.email = email;
	}


	
	public Supplier getSupplierId() {
		return supplierId;
	}



	public void setSupplierId(Supplier supplierId) {
		this.supplierId = supplierId;
	}



	public SupplierUser(){
		
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPhn() {
		return phn;
	}

	public void setPhn(String phn) {
		this.phn = phn;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	
}
